function [decParams vdata] = getDecPlane(data, labels, lRate, itersPerLevel=15)
    classes    = unique(labels);
    dimensions = size(data,2);
    classNo    = size(classes,1);
    decParams  = [zeros(classNo,dimensions+1);zeros(classNo*(classNo-1)/2,dimensions+1)];

    #slice it up
    [data vdata] = sliceData([labels, data],0.9);
    labels = data(:,1);
    data(:,1)=[];
    #important to normalize afterwards - verification will be performed on raw data
    data=[ones(size(data,1),1),data];    

    for(i=1:size(classes,1))
        tempLabels=zeros(size(labels));
        tempLabels(labels(:,1)==classes(i,1),1)=1;
        decParams(i,:)=gradientDescent(data, tempLabels, decParams(i,:),lRate, vdata, decParams, i, itersPerLevel);
    end;

    for(i=1:size(classes,1)-1)
        for(j=i+1:size(classes,1))
            selector=((labels==classes(i,1)).+(labels==classes(j,1))>0);

            tempLabels=labels(selector);
            printf("i: %d, j: %d , classes: \n",i,j);

            tempLabels(tempLabels==classes(j,1))=-1;
            tempLabels(tempLabels!=-1)=1;
            tempLabels(tempLabels==-1)=0;
            
            tempData = data(selector,:);

            paramsInd = getParamsIndex(classNo,i,j);
            decParams(paramsInd,:)=gradientDescent(tempData, tempLabels, decParams(paramsInd,:), lRate, vdata, decParams, paramsInd, itersPerLevel);
        endfor;
    endfor;
end;
